import component from './upload.vue'

export default function (Vue) {
    const Constructor = Vue.extend(component)
    const Instance = new Constructor();
    Instance.$mount()
    // document.body.appendChild(Instance.$el)
    Vue.prototype.$readFile = (obj) => {
        Instance.options = obj
        Instance?.clearFiles();
        return new Promise((resolve, reject) => {
            Vue.nextTick(() => {
                Instance.handlerClick(resolve, reject);
            })
        })
    }
}